package com.example.alteroracle.base.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum StatusCode {

    SUCCESS(2000, "OK"),
    LOGIN_SUCCESS(2001, "登录成功"),
    OPERATION_SUCCESS(2002, "操作成功"),

    PRODUCT_INVENTORY_NOT_ENOUGH(3001, "库存不足"),

    NOT_LOGIN(4000, "未登录"),
    USERNAME_ERROR(4002, "用户名不存在"),
    PASSWORD_ERROR(4003, "密码错误"),

    OPERATION_FAILED(5001, "操作失败"),
    VALIDATE_ERROR(5002, "请求参数错误"),
    USERNAME_ALREADY_EXISTS(5003, "用户名被占用"),
    DATA_UN_EXISTS(5004, "请求数据不存在"),

    ORDER_CREATE_FAILED(6001, "订单创建失败"),
    ORDER_NOT_EXIST(6002, "订单不存在"),
    ORDER_ALREADY_EXISTS(6003, "不要重复购买");

    private Integer code;
    private String msg;

}
